const DrawerLineChartOption = {
    darkMode: true,
    legend:{
        show: true,
        icon: 'circle',
        textStyle: {
            fontFamily: 'pangmen',
            color: 'white',
            fontSize: 15,
        },
        data: [
            {name: '确诊', itemStyle: {color: '#DB0000'}},
            {name: '治愈', itemStyle: {color: '#1E90FF'}},
            {name: '死亡', itemStyle: {color: '#000000'}},
        ]
    },
    xAxis: {
        show: false,
        data:[],
        type: 'category',
    },
    yAxis: {
        show: false,
        type: 'value', //TODO 这个地方最好换成对数轴，但是不知道为什么一换成log就出问题
    },
    series: [
        {
            type: 'line',
            name: '确诊',
            symbol: 'none',
            endLabel: {
                show: true,
                fontFamily: 'iceland',
                fontSize: 20,
                offset: [-50,-20],
                textBorderColor: '#DB0000',
                textBorderWidth: 2,
                textBorderType: 'solid',
            },
            lineStyle: {
                color: '#DB0000',
                cap: 'round',
            },
            smooth: true,
            sampling: 'lttb',
            data: [],
        },
        {
            type: 'line',
            name: '治愈',
            symbol: 'none',
            endLabel: {
                show: true,
                fontFamily: 'iceland',
                fontSize: 20,
                offset: [-50,-20],
                textBorderColor: '#1E90FF',
                textBorderWidth: 2,
                textBorderType: 'solid',
            },
            lineStyle: {
                color: '#1E90FF',
                cap: 'round',
            },
            smooth: true,
            sampling: 'lttb',
            data: [],
        },
        {
            type: 'line',
            name: '死亡',
            symbol: 'none',
            endLabel: {
                show: true,
                fontFamily: 'iceland',
                fontSize: 20,
                offset: [-50,-20],
                textBorderColor: 'black',
                textBorderWidth: 2,
                textBorderType: 'solid',
            },
            lineStyle: {
                color: '#000000',
                cap: 'round',
            },
            smooth: true,
            sampling: 'lttb',
            data: [],
        },
    ]
};
const DrawerLoading = {
    maskColor: 'rgba(0,0,0,0)',
    text: '  正在聚合...',
    color: 'gray',
    spinnerRadius: 10,
    textColor: 'gray',
    fontFamily: 'pangmen',
    fontSize: 30,
}
const DrawerBarChartOption = {
    legend:{
        show: true,
        icon: 'circle',
        textStyle: {
            fontFamily: 'pangmen',
            color: 'white',
            fontSize: 15,
        },
        data: [
            {name: '现存确诊', itemStyle: {color: '#DB0000'}},
            {name: '治愈', itemStyle: {color: '#1E90FF'}},
            {name: '死亡', itemStyle: {color: '#000000'}},
        ]
    },
    grid: {
        top: 20,
        left: 60,
        bottom: 20,
    },
    xAxis: {
        type: 'value',
        show: false
    },
    yAxis: {
        type: 'category',
        show: false,
        data: ['Mon']
    },
    series: [
        {
            name: '死亡',
            type: 'bar',
            stack: 'total',
            barWidth: 30,
            label: {
                show: true,
                fontFamily: 'iceland',
                fontSize:20,
                color: 'white',
                textBorderColor: 'black',
                textBorderWidth: 2,
                textBorderType: 'solid',
                position: 'bottom'
            },
            emphasis: {
                focus: 'series'
            },
            data: [320],
            itemStyle: {
                color: '#000000',
            }
        },
        {
            name: '治愈',
            type: 'bar',
            stack: 'total',
            label: {
                show: true,
                fontFamily: 'iceland',
                fontSize:20,
                color: 'white',
                textBorderColor: '#1E90FF',
                textBorderWidth: 2,
                textBorderType: 'solid',
                position: 'top',
            },
            emphasis: {
                focus: 'series'
            },
            data: [120],
            itemStyle: {
                color: '#1E90FF',
            }
        },
        {
            name: '现存确诊',
            type: 'bar',
            stack: 'total',
            label: {
                show: true,
                fontFamily: 'iceland',
                fontSize:20,
                color: 'white',
                textBorderColor: '#DB0000',
                textBorderWidth: 3,
                textBorderType: 'solid',
                position: 'bottom',
            },
            emphasis: {
                focus: 'series'
            },
            data: [220],
            itemStyle: {
                color: '#DB0000',
            }
        },
    ]
}

export default {
    DrawerLineChartOption,
    DrawerLoading,
    DrawerBarChartOption
}